package round77;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * User: Samuel
 * Date: 07-08-11
 * Time: 09:14 AM
 */
public class A {
    public static void main(String[] args) throws IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        String line = in.readLine();
        int zeroes = 0, ones = 0;
        for (int i = 0, len = line.length(); i < len; i++) {
            if (line.charAt(i) == '0') {
                ones = 0;
                zeroes++;
                if (zeroes >= 7) {
                    System.out.println("YES");
                    System.exit(0);
                }
            } else {
                zeroes = 0;
                ones++;
                if (ones >= 7) {
                    System.out.println("YES");
                    System.exit(0);
                }
            }
        }
        System.out.println("NO");
    }
}
